package com.linoer.cloud.alo.orderservice.controller;

import com.linoer.cloud.alo.common.domain.ObjectResponse;
import com.linoer.cloud.alo.common.domain.dto.OrderDTO;
import com.linoer.cloud.alo.orderservice.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Classname OrderController
 * @Description TODO
 * @Date 2021/6/24 5:32 下午
 * @Created by muhenglv
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @PostMapping("/create")
    public ObjectResponse createOrder(@RequestBody OrderDTO order){
        return orderService.createOrder(order);
    }
}
